package com.xxx.car.service;

import com.github.pagehelper.Page;
import com.github.pagehelper.PageInfo;
import com.xxx.car.entity.TbAppeal;
import com.xxx.car.entity.TbTravelOrder;
import com.xxx.car.entity.vo.request.*;
import com.xxx.car.entity.vo.response.*;
import com.xxx.common.base.vo.APIResponse;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * Created by youxiaojia on 2017/6/20.
 *
 * 行程单和申诉service
 */
public interface TravelAppealService {

    RespUserTravelOrder queryUserTravelOrderList(ReqUserTravelOrderQuery reqUserTravelOrderQuery);

    TbTravelOrder queryUserTravelOrderDetail(ReqUserTravelOrderQuery reqUserTravelOrderQuery);

    List<TbAppeal> queryUserAppealList(ReqUserAppealQuery reqUserAppealQuery);

    APIResponse submitUserAppeal(ReqAppeal reqAppeal);

    TbAppeal queryUserAppealDetail(ReqUserAppealQuery reqUserAppealQuery);

    TbAppeal queryUserAppealDetailByTravelOrderId(Integer travelOrderId);

    void updateUserAppealDetail(ReqAppeal reqAppeal) throws Exception;

	/**
     * 入参:车辆车牌号码 如:京A8888
     *      进站高速名称 如:京港澳高速
     *      进站路段名称 如:长潭段
     *      进站收费站名称 如:李家塘收费站
     *      入站开始时间 如:yyyy-MM-DD 08:00:00
     */
    String createStartTravel(String carNo, String gaosuName,
                                   String roadName, String stateName) throws Exception;

    /**
     * 入参:车辆车牌号码 如:京A8888
     *      进站高速名称 如:京港澳高速
     *      进站路段名称 如:长潭段
     *      进站收费站名称 如:李家塘收费站
     *      入站开始时间 如:yyyy-MM-DD 08:00:00
     */
    String finishTravel(String carNo, String gaosuName,
                             String roadName, String stateName,
                             BigDecimal distance, BigDecimal price) throws Exception;

    APIResponse travelRefund(Integer travelOrderId,String operater);

    PageInfo queryAppealAdminList(ReqAppealAdminQuery query);

    int countCompleteAppeal();

    APIResponse updateAppealReply(ReqAppealUpdate update);

    PageInfo queryRefundAdminList(ReqRefundAdminQuery query);

    Map totalRefundAmountAndRefundCount();

    List<RespRefundDetail> selectRefundDetail(ReqRefundAdminQuery query);

    PageInfo queryFeedAdminList(ReqFeedAdminQuery query);

    Map totalCompeleteAndUncompelete();

    APIResponse updateFeedReply(ReqFeedUpdate update);

    RespTotalConsume queryConsumerTotal(ReqConsumeQuery reqConsumeQuery);

    Page<RespUserConsume> queryConsumeList(ReqConsumeQuery reqConsumeQuery);

    RespCarStatisticsTotal queryCarTotal(ReqCarStatistics reqCarStatistics);

    Page<TbTravelOrder> queryTravel(ReqCarStatistics reqCarStatistics);
}
